package com.ruoyi.sale.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 商品对象 erp_goods
 *
 * @author ruoyi
 * @date 2025-03-12
 */
public class ErpGoodss extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Integer num; // 商品数量

    // getter & setter
    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    /** $column.columnComment */
    private Long id;

    /** 商品编号 */
    @Excel(name = "商品编号")
    private String sn;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 商品分类id */
    @Excel(name = "商品分类id")
    private Long categoryId;

    /** 品牌id */
    @Excel(name = "品牌id")
    private Long brandId;

    /** 是否上架 */
    @Excel(name = "是否上架")
    private Integer marketEnable;

    /** 详情 */
    @Excel(name = "详情")
    private String description;

    /** 是否有规格 */
    @Excel(name = "是否有规格")
    private Integer haveSpec;

    /** 图片 */
    @Excel(name = "图片")
    private String image;

    /** 运费模板id（0代表包邮） */
    @Excel(name = "运费模板id", readConverterExp = "0=代表包邮")
    private Long freightTemplateId;

    /** 商品视频 */
    @Excel(name = "商品视频")
    private String video;

    /** 销售价格 */
    @Excel(name = "销售价格")
    private BigDecimal price;

    /** 成本价格 */
    @Excel(name = "成本价格")
    private BigDecimal costPrice;

    /** 市场价格 */
    @Excel(name = "市场价格")
    private BigDecimal mktPrice;

    /** 创建者 */
    @Excel(name = "创建者")
    private String creator;

    /** 税率 */
    @Excel(name = "税率")
    private BigDecimal taxRate;

//    /** 商品库存对象(erp_product_stock)信息 */
//    private List<ErpProductStock> erpProductStockList;
//
//    /** 规格值对象 es_spec_values信息 */
//    private List<EsSpecValues> esSpecValuesList;
//
//    /** 分类规格关联对象 es_category_spec信息 */
//    private List<EsCategorySpec> esCategorySpecList;
//
//    /** 商品分类对象 es_category信息 */
//    private List<EsCategory> esCategoryList;

    private String categoryName;

    private String specName;

    private int totalStock;

    private Integer countNum;    // 库存数量
    private Integer entryNum;

    public Integer getCountNum() {
        return countNum;
    }

    public void setCountNum(Integer countNum) {
        this.countNum = countNum;
    }

    public Integer getEntryNum() {
        return entryNum;
    }

    public void setEntryNum(Integer entryNum) {
        this.entryNum = entryNum;
    }

    /** 更新者 */
    @Excel(name = "更新者")
    private String updater;

    private Integer pageNum;
    private Integer pageSize;

    private String erpGoods; // 假设这是一个字符串类型的属性


    private String brandName;  // 添加这个字段
    private String specNames;
    private String labelNames;

//    private List<ErpGoodsInventory> erpGoodsInventoryList;
//
//    public List<ErpGoodsInventory> getErpGoodsInventoryList() {
//        return erpGoodsInventoryList;
//    }
//
//    public void setErpGoodsInventoryList(List<ErpGoodsInventory> erpGoodsInventoryList) {
//        this.erpGoodsInventoryList = erpGoodsInventoryList;
//    }

    // ... 其他现有方法


    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    public String getSpecNames() {
        return specNames;
    }

    public void setSpecNames(String specNames) {
        this.specNames = specNames;
    }

    public String getLabelNames() {
        return labelNames;
    }

    public void setLabelNames(String labelNames) {
        this.labelNames = labelNames;
    }

    // 添加 getter 和 setter 方法
    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    // Getter and Setter
    public String getErpGoods() {
        return erpGoods;
    }

    public void setErpGoods(String erpGoods) {
        this.erpGoods = erpGoods;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setSn(String sn)
    {
        this.sn = sn;
    }

    public String getSn()
    {
        return sn;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setBrandId(Long brandId)
    {
        this.brandId = brandId;
    }

    public Long getBrandId()
    {
        return brandId;
    }
    public void setMarketEnable(Integer marketEnable)
    {
        this.marketEnable = marketEnable;
    }

    public Integer getMarketEnable()
    {
        return marketEnable;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setHaveSpec(Integer haveSpec)
    {
        this.haveSpec = haveSpec;
    }

    public Integer getHaveSpec()
    {
        return haveSpec;
    }
    public void setImage(String image)
    {
        this.image = image;
    }

    public String getImage()
    {
        return image;
    }
    public void setFreightTemplateId(Long freightTemplateId)
    {
        this.freightTemplateId = freightTemplateId;
    }

    public Long getFreightTemplateId()
    {
        return freightTemplateId;
    }
    public void setVideo(String video)
    {
        this.video = video;
    }

    public String getVideo()
    {
        return video;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setCostPrice(BigDecimal costPrice)
    {
        this.costPrice = costPrice;
    }

    public BigDecimal getCostPrice()
    {
        return costPrice;
    }
    public void setMktPrice(BigDecimal mktPrice)
    {
        this.mktPrice = mktPrice;
    }

    public BigDecimal getMktPrice()
    {
        return mktPrice;
    }
    public void setCreator(String creator)
    {
        this.creator = creator;
    }

    public String getCreator()
    {
        return creator;
    }
    public void setUpdater(String updater)
    {
        this.updater = updater;
    }

    public String getUpdater()
    {
        return updater;
    }

//    public List<ErpProductStock> getErpProductStockList() {
//        return erpProductStockList;
//    }
//
//    public void setErpProductStockList(List<ErpProductStock> erpProductStockList) {
//        this.erpProductStockList = erpProductStockList;
//    }
//
//    public List<EsSpecValues> getEsSpecValuesList() {
//        return esSpecValuesList;
//    }
//
//    public void setEsSpecValuesList(List<EsSpecValues> esSpecValuesList) {
//        this.esSpecValuesList = esSpecValuesList;
//    }
//
//    public List<EsCategorySpec> getEsCategorySpecList() {
//        return esCategorySpecList;
//    }
//
//    public void setEsCategorySpecList(List<EsCategorySpec> esCategorySpecList) {
//        this.esCategorySpecList = esCategorySpecList;
//    }
//
//    public List<EsCategory> getEsCategoryList() {
//        return esCategoryList;
//    }
//
//    public void setEsCategoryList(List<EsCategory> esCategoryList) {
//        this.esCategoryList = esCategoryList;
//    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getSpecName() {
        return specName;
    }

    public void setSpecName(String specName) {
        this.specName = specName;
    }

    public int getTotalStock() {
        return totalStock;
    }

    public void setTotalStock(int totalStock) {
        this.totalStock = totalStock;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sn", getSn())
            .append("name", getName())
            .append("categoryId", getCategoryId())
            .append("brandId", getBrandId())
            .append("marketEnable", getMarketEnable())
            .append("description", getDescription())
            .append("haveSpec", getHaveSpec())
            .append("image", getImage())
            .append("freightTemplateId", getFreightTemplateId())
            .append("video", getVideo())
            .append("price", getPrice())
            .append("costPrice", getCostPrice())
            .append("mktPrice", getMktPrice())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("creator", getCreator())
            .append("updater", getUpdater())
            .append("taxRate", getTaxRate())
//            .append("erpProductStockList",getErpProductStockList())
//            .append("esSpecValuesList",getEsSpecValuesList())
//            .append("esCategorySpecList",getEsCategorySpecList())
//            .append("esCategoryList",getEsCategoryList())
                .append("categoryName",getCategoryName())
                .append("specName",getSpecName())
                .append("totalStock",getTotalStock())
            .toString();
    }
}
